package cn.edu.scau.cmi.chenmiaopeng.comprehensive.client;

import java.io.IOException;

import controller.ComprehensiveController;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.application.Application;
import javafx.scene.layout.Border;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.BorderStroke;
import javafx.scene.layout.BorderStrokeStyle;
import javafx.scene.layout.BorderWidths;

public class ComprehensiveExperimentClient extends Application{
	public static void main(String[] args) {
		launch(args);                                
	}
	public void start(Stage primaryStage) throws Exception{
		try {
		  FXMLLoader loader = new FXMLLoader(getClass().getResource("/ui/ComprehensiveUI.fxml"));
		  Parent root = loader.load();
		  Scene scene = new Scene(root, 800, 650);
		  primaryStage.setScene(scene);
		  primaryStage.setTitle("软件体系结构 综合设计性实验");
		  initView(loader,primaryStage);
		  primaryStage.show();
		}
		catch(IOException e) {
			e.printStackTrace();
		}
	}
	private void initView(FXMLLoader loader,Stage s) {
		ComprehensiveController con = loader.getController();
//		BorderStroke border = new BorderStroke(Color.BLACK,BorderStrokeStyle.NONE,CornerRadii.EMPTY,10.0);
		BorderWidths width = new BorderWidths(2.0);
		BorderStroke borderStroke = new BorderStroke(Color.BLACK, BorderStrokeStyle.DASHED, null, width);
		Border border = new Border(borderStroke);
		con.setNowStage(s);
		
		con.setBorder(border);
//		showView.setVisible(false);
//		showView.setStyle("-fx-border-color: black");
//		showView.setStyle("-fx-border");
	}
}
